import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login/login'
import home from '@/view/home/home'
import ShopManagement from '@/view/ShopManagement/ShopManagement'
import CommodityManagement from '@/view/ShopManagement/CommodityManagement'
import detail from '@/view/ShopManagement/detail'
import CommodityClassification from '@/view/ShopManagement/CommodityClassification'
import CommoditySpecification from '@/view/ShopManagement/CommoditySpecification'
import CommodityReview from '@/view/ShopManagement/CommodityReview'
import ShopCart from '@/view/ShopManagement/ShopCart'
import BannerManagement from '@/view/ShopManagement/BannerManagement'
import FavoritesList from '@/view/ShopManagement/FavoritesList'
import FileStore from '@/view/ShopManagement/FileStore'
import ProductEditing from '@/view/ShopManagement/ProductEditing'
import ShopDetail from '@/view/ShopManagement/ShopDetail'
import orderDetail from '@/view/ShopManagement/orderDetail'



import PromotionManagement from '@/view/PromotionManagement/PromotionManagement'
import ThematicManagement from '@/view/PromotionManagement/ThematicManagement'

import CMSManagement from '@/view/CMSManagement/CMSManagement'
import ColumnManagement from '@/view/CMSManagement/ColumnManagement'
import EditPost from '@/view/CMSManagement/EditPost'
import ArticleManagement from '@/view/CMSManagement/ArticleManagement'
import InvitationManagement from '@/view/CMSManagement/InvitationManagement'

import UserManagement from '@/view/SystemManagement/UserManagement'
import RoleManagement from '@/view/SystemManagement/RoleManagement'
import SystemManagement from '@/view/SystemManagement/SystemManagement'
// import DepartmentManagement from '@/view/SystemManagement/DepartmentManagement'
import MenuManagement from '@/view/SystemManagement/MenuManagement'
import DictionaryManagement from '@/view/SystemManagement/DictionaryManagement'
import PhysicalDistributionManagement from '@/view/SystemManagement/PhysicalDistributionManagement'
import ParameterManagement from '@/view/SystemManagement/ParameterManagement'
import TaskManagement from '@/view/SystemManagement/TaskManagement'

import MessageManagement from '@/view/MessageManagement/MessageManagement'
import HistoricalMessages from '@/view/MessageManagement/HistoricalMessages'
import MessageTemplate from '@/view/MessageManagement/MessageTemplate'
import MessageSender from '@/view/MessageManagement/MessageSender'

import MonitoringManagement from '@/view/MochaITOM/MonitoringManagement'
import InterfaceDocument from '@/view/MochaITOM/InterfaceDocument'
import MochaITOM from '@/view/MochaITOM/MochaITOM'
import BusinessLog from '@/view/MochaITOM/BusinessLog'
import LoginLog from '@/view/MochaITOM/LoginLog'

import dashboard from '@/view/dashboard/dashboard'

Vue.use(Router)

export default new Router({
    mode: "hash", //默认
    routes: [{
            path: '/',
            name: 'login',
            component: login,
        },
        {
            path: "/home",
            name: "home",
            component: home,
            redirect: "/dashboard",
            children: [{
                    path: "/dashboard",
                    name: "dashboard",
                    component: dashboard,
                },
                {
                    path: "/ShopManagement",
                    name: "ShopManagement",
                    component: ShopManagement,
                    redirect: "/ShopManagement/CommodityManagement",
                    children: [{
                            path: "/ShopManagement/CommodityManagement",
                            name: "CommodityManagement",
                            component: CommodityManagement,
                        },
                        {
                            path: "/ShopManagement/CommodityClassification",
                            name: "CommodityClassification",
                            component: CommodityClassification
                        },
                        {
                            path: "/ShopManagement/CommoditySpecification",
                            name: "CommoditySpecification",
                            component: CommoditySpecification
                        },
                        {
                            path: "/ShopManagement/CommodityReview",
                            name: "CommodityReview",
                            component: CommodityReview
                        },
                        {
                            path: "/ShopManagement/ShopCart",
                            name: "ShopCart",
                            component: ShopCart
                        },
                        {
                            path: "/ShopManagement/BannerManagement",
                            name: "BannerManagement",
                            component: BannerManagement
                        },
                        {
                            path: "/ShopManagement/FavoritesList",
                            name: "FavoritesList",
                            component: FavoritesList
                        },
                        {
                            path: "/ShopManagement/FileStore",
                            name: "FileStore",
                            component: FileStore
                        },
                        {
                            path: "/ShopManagement/ProductEditing",
                            name: "ProductEditing",
                            component: ProductEditing
                        },
                        {
                            path: "/ShopManagement/ShopDetail",
                            name: "ShopDetail",
                            component: ShopDetail
                        },
                        {
                            path: "/ShopManagement/detail",
                            name: "detail",
                            component: detail
                        },
                        {
                            path: "/ShopManagement/orderDetail",
                            name: "orderDetail",
                            component: orderDetail
                        },
                    ]
                },
                {
                    path: "/PromotionManagement",
                    name: "PromotionManagement",
                    component: PromotionManagement,
                    redirect: "/PromotionManagement/ThematicManagement",
                    children: [{
                        path: "/PromotionManagement/ThematicManagement",
                        name: "ThematicManagement",
                        component: ThematicManagement,
                    }, ]
                },
                {
                    path: "/CMSManagement",
                    name: "CMSManagement",
                    component: CMSManagement,
                    redirect: "/CMSManagement/ColumnManagement",
                    children: [{
                            path: "/CMSManagement/ColumnManagement",
                            name: "ColumnManagement",
                            component: ColumnManagement,
                        },
                        {
                            path: "/CMSManagement/EditPost",
                            name: "EditPost",
                            component: EditPost,
                        },
                        {
                            path: "/CMSManagement/ArticleManagement",
                            name: "ArticleManagement",
                            component: ArticleManagement,
                        },
                        {
                            path: "/CMSManagement/InvitationManagement",
                            name: "InvitationManagement",
                            component: InvitationManagement,
                        }
                    ]
                },
                {
                    path: "/SystemManagement",
                    name: "SystemManagement",
                    component: SystemManagement,
                    redirect: "/SystemManagement/UserManagement",
                    children: [{
                            path: "/SystemManagement/UserManagement",
                            name: "UserManagement",
                            component: UserManagement,
                        },
                        {
                            path: "/SystemManagement/RoleManagement",
                            name: "RoleManagement",
                            component: RoleManagement,
                        },
                        // {
                        //     path: "/SystemManagement/DepartmentManagement",
                        //     name: "DepartmentManagement",
                        //     component: DepartmentManagement,
                        // },
                        {
                            path: "/SystemManagement/MenuManagement",
                            name: "MenuManagement",
                            component: MenuManagement,
                        },
                        {
                            path: "/SystemManagement/DictionaryManagement",
                            name: "DictionaryManagement",
                            component: DictionaryManagement,
                        },
                        {
                            path: "/SystemManagement/PhysicalDistributionManagement",
                            name: "PhysicalDistributionManagement",
                            component: PhysicalDistributionManagement,
                        },
                        {
                            path: "/SystemManagement/ParameterManagement",
                            name: "ParameterManagement",
                            component: ParameterManagement,
                        },
                        {
                            path: "/SystemManagement/TaskManagement",
                            name: "TaskManagement",
                            component: TaskManagement,
                        }
                    ]
                },
                {
                    path: "/MessageManagement",
                    name: "MessageManagement",
                    component: MessageManagement,
                    redirect: "/MessageManagement/HistoricalMessages",
                    children: [{
                            path: "/MessageManagement/HistoricalMessages",
                            name: "HistoricalMessages",
                            component: HistoricalMessages,
                        },
                        // {
                        //     path: "/MessageManagement/MessageTemplate",
                        //     name: "MessageTemplate",
                        //     component: MessageTemplate,
                        // },
                        {
                            path: "/MessageManagement/MessageSender",
                            name: "MessageSender",
                            component: MessageSender,
                        }
                    ]
                },
                {
                    path: "/MochaITOM",
                    name: "MochaITOM",
                    component: MochaITOM,
                    redirect: "/MochaITOM/MonitoringManagement",
                    children: [{
                            path: "/MochaITOM/MonitoringManagement",
                            name: "MonitoringManagement",
                            component: MonitoringManagement,
                        },
                        {
                            path: "/MochaITOM/InterfaceDocument",
                            name: "InterfaceDocument",
                            component: InterfaceDocument,
                        },
                        {
                            path: "/MochaITOM/BusinessLog",
                            name: "BusinessLog",
                            component: BusinessLog,
                        },
                        {
                            path: "/MochaITOM/LoginLog",
                            name: "LoginLog",
                            component: LoginLog,
                        }
                    ]
                },
            ]
        },

    ]
})